package com.kaigejava.demo.business.common;

import com.kaigejava.demo.business.service.WebSocketService;
import com.kaigejava.demo.websocket.DyWebSocketClient;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @BelongsProject: douyin-live-java
 * @Author: kaigejava
 * @CreateTime: 2023-11-09  16:13
 * @Description: 公共
 * @Version: 1.0
 */
public class GlobalMap {

    public static ConcurrentHashMap<String, WebSocketService> webSocketMap = new ConcurrentHashMap<>();

    public static ConcurrentHashMap<String, WebSocketService> getWebSocketMap() {
        return webSocketMap;
    }

    public static void setWebSocketMap(ConcurrentHashMap<String, WebSocketService> webSocketMap) {
        GlobalMap.webSocketMap = webSocketMap;
    }


    public static ConcurrentHashMap<String, DyWebSocketClient> dyWebSocketMap = new ConcurrentHashMap<>();

    public static ConcurrentHashMap<String, DyWebSocketClient> getDYWebSocketMap() {
        return dyWebSocketMap;
    }

    public static void setDyWebSocketMap(ConcurrentHashMap<String, DyWebSocketClient> dyWebSocketMap) {
        GlobalMap.dyWebSocketMap = dyWebSocketMap;
    }
}
